<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/jsp/include.jsp"%>
<%--
TODO: create request attribue where need to store info about current selected menu item.
TODO: this attribute should be filled in each controller. In abstract controller there shold be abstract method(setMenu)
TODO: and ech controller will set its own menu item. In some cases this menu item could be replaced in controllers method
--%>
<%
    String currentPath = (String) request.getAttribute("javax.servlet.forward.servlet_path");
%>
<td rowspan="2" class="main_menu_cell">
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td>
                <a href="<c:url value="/main.html"/>" class="menu_link">
                    <div class="menu_item<% if (currentPath.equalsIgnoreCase("/main.html")) { %> selected_menu_item<% } %>">
                        <span class="menu_icon_countainer">
                            <i class="menu_icon_img_0"></i>
                        </span>
                        <span class="menu_title_conteiner">Главная</span>
                    </div>
                </a>
            </td>
        </tr>
        <tr>
            <td>
                <a href="<c:url value="/userstables-list.html"/>" class="menu_link">
                    <div class="menu_item<% if (currentPath.equalsIgnoreCase("/userstables-list.html")) { %> selected_menu_item<% } %>">
                        <span class="menu_icon_countainer">
                            <i class="menu_icon_img_1"></i>
                        </span>
                        <span class="menu_title_conteiner">Мои таблицы</span>
                    </div>
                </a>
            </td>
        </tr>
        <tr>
            <td>
                <a href="<c:url value="/users-recipes-list.html"/>" class="menu_link">
                    <div class="menu_item<% if (currentPath.equalsIgnoreCase("/users-recipes-list.html")) { %> selected_menu_item<% } %>">
                        <span class="menu_icon_countainer">
                            <i class="menu_icon_img_2"></i>
                        </span>
                        <span class="menu_title_conteiner">Мои рецепты</span>
                    </div>
                </a>
            </td>
        </tr>
        <tr>
            <td>
                <a href="<c:url value="/main.html"/>" class="menu_link">
                    <div class="menu_item<% if (currentPath.equalsIgnoreCase("/favorites")) { %> selected_menu_item<% } %>">
                        <span class="menu_icon_countainer">
                            <i class="menu_icon_img_3"></i>
                        </span>
                        <span class="menu_title_conteiner">Избранные рецепты</span>
                    </div>
                </a>
            </td>
        </tr>
        <tr>
            <td>
                <a href="<c:url value="/get-users-prices-list.html"/>" class="menu_link">
                    <div class="menu_item<% if (currentPath.equalsIgnoreCase("/get-users-prices-list.html")) { %> selected_menu_item<% } %>">
                        <span class="menu_icon_countainer">
                            <i class="menu_icon_img_4"></i>
                        </span>
                        <span class="menu_title_conteiner">Мои цены</span>
                    </div>
                </a>
            </td>
        </tr>
    </table>
    <br/>
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td>
                <a href="<c:url value="/main.html"/>" class="menu_link">
                    <div class="menu_item<% if (currentPath.equalsIgnoreCase("/serach-ut")) { %> selected_menu_item<% } %>">
                        <span class="menu_icon_countainer">
                            <i class="menu_icon_img_5"></i>
                        </span>
                        <span class="menu_title_conteiner">Поиск таблиц</span>
                    </div>
                </a>

            </td>
        </tr>
        <tr>
            <td>
                <a href="<c:url value="/main.html"/>" class="menu_link">
                    <div class="menu_item<% if (currentPath.equalsIgnoreCase("/search-recipe")) { %> selected_menu_item<% } %>">
                        <span class="menu_icon_countainer">
                            <i class="menu_icon_img_6"></i>
                        </span>
                        <span class="menu_title_conteiner">Поиск рецептов</span>
                    </div>
                </a>
            </td>
        </tr>
        <tr>
            <td>
                <a href="<c:url value="/go-shop-report-generation-form.html"/>" class="menu_link">
                    <div class="menu_item<% if (currentPath.equalsIgnoreCase("/go-shop-report-generation-form.html")) { %> selected_menu_item<% } %>">
                        <span class="menu_icon_countainer">
                            <i class="menu_icon_img_7"></i>
                        </span>
                        <span class="menu_title_conteiner">Пойти в магазин</span>
                    </div>
                </a>
            </td>
        </tr>
    </table>
</td>
